<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<style type="text/css">
/*修改*/
/*.bs-main-container{
    padding: 15px 30px;
}*/

/*结束*/
</style>
<div class="bs-container clearfix">
  <div class="bs-left-container  clearfix"> 
    <!--{template left}--> 
  </div>
  <div class="left-drager">
  </div>
  <div class="bs-main-container  clearfix">
    <div class="main-header clearfix"> 
      <!--{template right_header}--> 
    </div>
    <div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF" >
      <form id="cpform" action="{BASESCRIPT}?mod=cloud&op=movetool" class="form-horizontal form-horizontal-left"  method="post" name="cpform" onsubmit="return validate(this);">
        <input type="hidden" value="{FORMHASH}" name="formhash">
        <input type="hidden" value="movesubmit" name="true">
        <dl>
          <dt>{lang target_location}:</dt>
          <dd class="clearfix">
            <select name="remoteid" class="form-control" style="width:250px">
              <!--{loop $spaces $value}--> 
              <option value="$value[remoteid]" <!--{if $router[remoteid]==$value[remoteid]}-->selected="selected" 
              <!--{/if}-->>$value[name]($value[fusesize] / $value[ftotalsize])
              </option>
              <!--{/loop}-->
            </select>
            <ul class="help-block ">
              <li>{lang cloud_movetool_designator_text}</li>
            </ul>
          </dd>
        </dl>
        <dl>
          <dt>{lang original_location}:</dt>
          <dd class="clearfix">
            <select name="oremoteid" class="form-control" style="width:250px">
              <!--{loop $spaces $value}-->
              <option value="$value[remoteid]" >$value[name]($value[fusesize] / $value[ftotalsize])</option>
              <!--{/loop}-->
            </select>
            <ul class="help-block ">
              <li>{lang cloud_movetool_designator_text}</li>
            </ul>
          </dd>
        </dl>
        <dl>
          <dt> <a href="javascript:;" onclick="jQuery('#filter').toggle(); document.getElementById('filter_guide').className=(document.getElementById('filter_guide').className=='glyphicon glyphicon-chevron-down'?'glyphicon glyphicon-chevron-up':'glyphicon glyphicon-chevron-down');">{lang filtrate_condition}&nbsp;<i id="filter_guide"  class="glyphicon glyphicon-chevron-down"></i></a> </dt>
        </dl>
        <div id="filter" style="display:none;padding-left:50px;">
          <dl>
            <dt>{lang file_type}:</dt>
            <dd class="clearfix">
              <textarea type="textarea" id="exts" class="form-control" name="router[exts]" row="6" cols="6" style="width:300px;height:60px"></textarea>
            </dd>
            <dd class="clearfix mt10"> 
            	<a href="javascript:;" onclick="setExts('jpg,jpeg,png,gif')">{lang photograph_class}</a>
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('doc,docx,rtf,odt,htm,html,txt')">word{lang type_attach}</a>
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('xls,xlsx,ods,sxc,csv,tsv')">excel{lang type_attach}</a>
                &nbsp;&nbsp;<a href="javascript:;" onclick="setExts('ppt,pptx,pps,ppsx,odp,sxi')">ppt{lang type_attach}</a>
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('mp4,avi,wmv,mkv,rmvb,rm,asf,mpg,mpeg,mov')">{lang video_typename_attach}</a> 
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('txt,ini,conf,log,bat,sql,js,css,htm,html,xml,asp,aspx,php,jsp,json,py,h,c')">text_class</a>
            </dd>
            <dd class="clearfix">
              <ul class="help-block ">
                {lang cloud_movetool_file_type_text}
              </ul>
            </dd>
          </dl>
          <dl>
            <dt>{lang file_size}:</dt>
            <dd class="clearfix ">
              <div class="input-group pull-left" style="width:100px"> <span class="input-group-addon">{lang typename_attach_gt}</span>
                <input type="text" class="form-control" name="router[size][lt]" style="width:60px;" value=""  />
                <span class="input-group-addon">M</span> </div>
              <div class="pull-left ml20 mr20" style="line-height:30px;"> AND</div>
              <div class="input-group pull-left" style="width:100px"> <span class="input-group-addon">{lang typename_attach_lt}</span>
                <input type="text" class="form-control" name="router[size][gt]" value="" style="width:60px;" />
                <span class="input-group-addon">M</span> </div>
            </dd>
            <dd class="clearfix ">
              <ul class="help-block ">
                {lang cloud_movetool_file_size_text}
              </ul>
            </dd>
          </dl>
        </div>
        <input class="btn btn-primary" name="movesubmit" value="{lang starting_migration}" type="submit">
      </form>
    </div>
    <div class="tip" style="margin: 20px;color: #444;text-shadow: 1px 1px 1px #FFF;line-height: 1.8;">
      <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <h5>{lang board_message}</h5>
        <ul>
          {lang cloud_movetool_board_message_text}
        </ul>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
 jQuery('.left-drager').leftDrager_layout();
 var  spaces=$spaces_json;
	function validate(form) {
		//验证原和目标位置
		if(form.remoteid.value == form.oremoteid.value) {
		alert('目标存储位置不能和原存储位置相同');
		form.remoteid.focus();
		return false; 
	 }
	 //判断原位置有无数据
	 if(spaces[form.oremoteid.value].usesize<1){
			alert('{lang cloud_movetool_home_position}');
		form.oremoteid.focus();
		return false; 
	 }
	 return true;
 }

 function setExts(str){
	  var old=trim(document.getElementById('exts').value).replace(/，{1,}/g,',').replace(/,{1,}/g,',').replace(/^\,/g,'');
	  var arr=old?old.split(','):[]; 
	  var newarr=str.split(',');
	  for(var i=0;i<newarr.length;i++){
		  if(jQuery.inArray(newarr[i],arr)<0){
			  arr.push(newarr[i]);
		  }
	  } 
	  document.getElementById('exts').value=arr.join(',');
  }
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}--> 
